import java.util.Scanner;

public class Main1 {
    boolean isPrime(int num){
        if(num < 2)
            return false;
        int i = 2;
        for(;i*i<=num;i++){
            if(num %i==0)
                break;
        }
        if(i*i >num)
            return true;
        return false;
    }
    public static void main(String[] args) {
        Main1 pc = new Main1();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count = 0;
        for(int i =1;i<=n;i++){
            if(pc.isPrime(i))
                count++;
        }
        sc.close();
        System.out.println(count);
    }
}